import request from '@/utils/request'

// 查询视频监控列表
export function listVideo(query) {
  return request({
    url: '/site/video/list',
    method: 'get',
    params: query
  })
}

// 查询用户视频监控列表
export function listVideoUser(query) {
  return request({
    url: '/site/video/selectUserVideoList',
    method: 'get',
    params: query
  })
}

// 查询用户视频监控未选择列表
export function listVideoUserUnselected(query) {
  return request({
    url: '/site/video/selectUserVideoUnselectedList',
    method: 'get',
    params: query
  })
}

// 查询场景视频监控
export function listSceneVideo(type) {
  return request({
    url: '/site/video/selectUserVideoListByType/' + type,
    method: 'get'
  })
}

// 查询视频监控详细
export function getVideo(id) {
  return request({
    url: '/site/video/' + id,
    method: 'get'
  })
}

// 新增视频监控
export function addVideo(data) {
  return request({
    url: '/site/video',
    method: 'post',
    data: data
  })
}

// 修改视频监控
export function updateVideo(data) {
  return request({
    url: '/site/video',
    method: 'put',
    data: data
  })
}

// 删除视频监控
export function delVideo(id) {
  return request({
    url: '/site/video/' + id,
    method: 'delete'
  })
}

// 导出视频监控
export function exportVideo(query) {
  return request({
    url: '/site/video/export',
    method: 'get',
    params: query
  })
}

// 查询萤石云token
export function getEzAccessToken() {
  return request({
    url: '/site/video/getEzAccessToken',
    method: 'get'
  })
}

// 保存用户选择的视频监控
export function saveUserVideo(data) {
  return request({
    url: '/site/video/saveUserVideo',
    method: 'post',
    params: data
  })
}

// 视频监控上移下移
export function moveVideo(data) {
  return request({
    url: '/site/video/moveVideo',
    method: 'post',
    params: data
  })
}
